package zjh_20230328;

import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.Arrays;

public class DBUtilsTest {
    public static void main(String[] args) throws SQLException {
        DBUtils<Object> objectDBUtils = new DBUtils<>();
        String str = "SELECT * from account";
        ResultSet resultSet = objectDBUtils.excuteQuery(str);
        ResultSetMetaData metaData = resultSet.getMetaData();
        int columnCount = metaData.getColumnCount();
        while (resultSet.next()){
            for (int i = 0; i < columnCount; i++) {
                Object object = resultSet.getObject(i + 1);
                String columnLabel = metaData.getColumnLabel(i + 1);
                System.out.println(columnLabel + "----" + object + "\t");
            }

        }
    }
}
